package com.corticon.dialogs.dto;

import java.io.Serializable;

import org.directwebremoting.annotations.DataTransferObject;

import com.corticon.dialogs.model.Question;

/**
 *
 * @author Lifan Yang
 * @since 2008-11-11
 */
@DataTransferObject
public class QuestionDTO implements Serializable {

    private Long questionId;
    private String refId;
    private long version;
    private String name;
    private String status;
    private String text;
    private String qisId;
    private String availability;
    private String sequence;

    public QuestionDTO() {
    }

    public QuestionDTO(Question question) {
        questionId = question.getQuestionId();
        refId = question.getRefId();
        version = question.getVersion();
        name = question.getName();
        status = question.getQuestionStatusType().getCode();
        text = question.getText();
        availability = question.getQuestionAvailabilityType().getCode();
    }

    public QuestionDTO(Question question, String nextSequence) {
        questionId = question.getQuestionId();
        refId = question.getRefId();
        version = question.getVersion();
        status = question.getQuestionStatusType().getCode();
        text = question.getText();
        availability = question.getQuestionAvailabilityType().getCode();
        sequence = nextSequence;
        name = question.getName();
    }

    public Long getQuestionId() {
        return questionId;
    }

    public void setQuestionId(Long questionId) {
        this.questionId = questionId;
    }

    public String getRefId() {
        return refId;
    }

    public void setRefId(String refId) {
        this.refId = refId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public long getVersion() {
        return version;
    }

    public void setVersion(long version) {
        this.version = version;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getQisId() {
        return qisId;
    }

    public void setQisId(String qisId) {
        this.qisId = qisId;
    }

    public String getAvailability() {
        return availability;
    }

    public void setAvailability(String availability) {
        this.availability = availability;
    }

    public String getSequence() {
        return sequence;
    }

    public void setSequence(String sequence) {
        this.sequence = sequence;
    }
}
